<?php
$alterid=isset($_POST['alterid'])?$_POST['alterid']:'';
$title=isset($_POST['title'])?$_POST['title']:'';
$author=isset($_POST['author'])?$_POST['author']:'';
 require('../../public/function.php');
connection('blog');
$sql="update blog set `title`='$title',`author`='$author' where id='$alterid'";
$res=mysql_query($sql);
if($res){
        echo "<script>alert('更改成功！');window.location.href='/admin/articlelist/design.php'</script>";
    }else{
        echo "<script>alert('更改失败！');window.location.href='/admin/articlelist/design.php'</script>";
}








